// 机构管理
import axios from "@/request/axios";

// 新增机构
export function organizationAdd(params: any) {
  return axios({
    url: "/system/dept/add",
    method: "post",
    data: params,
  });
}

// 删除机构
export function organizationDel(orgIds: any) {
  return axios({
    url: "/system/dept/del",
    method: "post",
    data: orgIds,
  });
}

// 获取参数详情
export function getOrganizationById(id: any) {
  return axios({
    url: "/system/dept/detail",
    method:"POST",
    data: { id }
  });
}

// 修改机构
export function organizationEdit(params: any) {
  return axios({
    url: "/system/dept/edit",
    method: "post",
    data: params,
  });
}

// 获取机构树
export function getOrgTree(params: any) {
  return axios({
    url: "/system/dept/tree",
    method: "post",
    data: params,
  });
}

// 机构列表(分页)
export function organizationQuery(params: any) {
  return axios({
    url: "/system/dept/query",
    method: "post",
    data: params,
  });
}
